<?php

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Helper
 *
 * @author sadaf.siddiqui
 */
class Helper {

    //strip sting with the patren [autoload][contact]
    // return array(autoload,contact)
    Public static function matchStrip($str) {
        $output_array = array();
        preg_match_all("^\[(.*?)\]^", $str, $output_array);
        return $output_array;
    }
    
    /* strip html and return space seperated string
     * 
     */
    public static function stripHtml($html){
       return preg_replace("/<[^>]*>/", " ", $html);
    }
    
    public static function cleanString($str){
        return preg_replace("/-|_|\+/", " ", $str);
    }
}

?>
